package com.hnx.admin.aurora.system.domain.param.menu.form;

import com.hnx.admin.aurora.annotation.KeyField;
import com.hnx.admin.aurora.annotation.RepeatTable;
import com.hnx.admin.aurora.annotation.ValidField;
import com.hnx.admin.aurora.web.json.BaseForm;
import lombok.Data;
import org.springframework.data.annotation.Id;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/*
创建人： 倔强的头发
创建时间：2025/7/1
功能描述:

*/
@Data
@RepeatTable("sys_menu")
public class MenuForm extends BaseForm {
    @ValidField(msg = "组件路径已存在",column = "component",flag = true,validFieldName = "menuType",validValue = "C",emptyMsg = "组件路径不能为空")
    private String component;
    private String icon;
    private String isCache;
    private String isFrame;
    @Id
    @KeyField("menu_id")
    private String menuId;
    @NotEmpty(message = "菜单名称不能为空")
    private String  menuName;
    private String menuType;
    @NotNull(message = "显示排序不能为空")
    private Integer orderNum;
    private String  parentId;
    private String parentName;
    @ValidField(msg = "路由地址已存在",column = "path",flag = true,validFieldName = "menuType",validValue = "F",validFlag = false,emptyMsg = "路由地址不能为空")
    private String  path;
    @ValidField(msg = "菜单权限标识已存在",column = "perms",flag = true,validFieldName = "menuType",validValue = "M",validFlag = false,emptyMsg = "菜单权限标识不能为空")
    private String perms;
    private String query;
    private String routeName;
    private String status;
    private String visible;
    private String remark;
}
